<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>

	<meta charset="utf-8" />

	<title>小傲娇 | 我的博客</title>

	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	<!-- BEGIN GLOBAL MANDATORY STYLES -->
	<link href="../media/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="../media/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>
	<link href="../media/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="../media/css/style-metro.css" rel="stylesheet" type="text/css"/>
	<link href="../media/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="../media/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="../media/css/default.css" rel="stylesheet" type="text/css" id="style_color"/>
	<!-- END GLOBAL MANDATORY STYLES -->

	<!-- BEGIN PAGE LEVEL STYLES -->
	<link rel="stylesheet" type="text/css" href="../media/css/select2_metro.css" />
	<link rel="stylesheet" href="../media/css/DT_bootstrap.css" />
	<!-- END PAGE LEVEL STYLES -->
	<link rel="shortcut icon" href="../media/image/favicon.ico" />

</head>

<style>
 .table th, .table td { 
	text-align: center; 
	}
</style>

<body class="page-header-fixed">

	<!-- BEGIN HEADER -->
	<jsp:include page="../include/admin_head.jsp" />
	<!-- END HEADER -->

	<!-- BEGIN CONTAINER -->
	<div class="page-container row-fluid">
	
		<!-- BEGIN SIDEBAR -->
		<jsp:include page="../include/admin_sidebar.jsp" />
		<!-- END SIDEBAR -->

		<!-- BEGIN PAGE -->
		<div class="page-content">

			<!-- BEGIN PAGE CONTAINER-->        
			<div class="container-fluid">

				<!-- BEGIN PAGE HEADER-->

				<div class="row-fluid">

					<div class="span12">

						<!-- BEGIN STYLE CUSTOMIZER -->
						<jsp:include page="../include/admin_tool.jsp" />						
						<!-- END BEGIN STYLE CUSTOMIZER -->  

						<!-- BEGIN PAGE TITLE & BREADCRUMB-->
						<h3 class="page-title">
							博客列表 <small>记录  ·  我的成长。</small>
						</h3>

						<!-- 导航栏
						<ul class="breadcrumb">
							<li>
								<i class="icon-home"></i>
								<a href="index.html">Home</a> 
								<i class="icon-angle-right"></i>
							</li>
							<li>
								<a href="#">Data Tables</a>
								<i class="icon-angle-right"></i>
							</li>
							<li><a href="#">Editable Tables</a></li>
						</ul>
						 导航栏end -->
						<!-- END PAGE TITLE & BREADCRUMB-->

					</div>

				</div>
				<!-- END PAGE HEADER-->

				<!-- BEGIN PAGE CONTENT-->
				<div class="row-fluid">
					<div class="span12">

						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box blue">
							<div class="portlet-title">
								<div class="caption"><i class="icon-edit"></i>博客列表</div>
								<div class="tools">
									<a title="收起" href="javascript:;" class="collapse"></a>									
									<a title="刷新" href="javascript:;" class="reload"></a>								
								</div>
							</div>

							<div class="portlet-body">
								<div class="clearfix">
									<div class="btn-group">
										<a  class="btn green" href="writing.do">发布博客</a> <i class="icon-plus"></i>			
									</div>
									<div class="btn-group" style="float: right;">																		
										<label>
											搜索: <input aria-controls="sample_editable_1" class="m-wrap medium" type="text">
										</label>			
									</div>
								</div>								
								<table class="table table-striped table-hover table-bordered" id="">
									<thead>
										<tr>
											<th>编号</th>
											<th>标题</th>																					
											<th>标签</th>
											<th>主题</th>
											<th>浏览次数</th>
											<th>发布时间</th>
											<th>作者</th>
											<th colspan="4">操作</th>
										</tr>
									</thead>
									<tbody>
										<c:forEach var="blogs" items="${map.objectList }">
											<tr class="">
												<td>${blogs.id }</td>
												<td><a href="getBlogById.do?id=${blogs.id }">${blogs.blogTitle}</a></td>				
												<td class="center">
													<c:forEach var="tag" items="${blogs.tagList}">
														<c:out value="${tag.tagName}  " />
													</c:forEach>
												</td>
												<td class="center">${blogs.theme.themeName}</td>
												<td class="center">${blogs.blogTimes}</td>
												<td class="center">${blogs.blogTime}</td>
										        <td class="center">admin</td>
										        <td>
										        	<c:choose>
										        		<c:when test="${blogs.blogTop==0 }">
										        			<a class="" href="setTop.do?&&type=top&&id=${blogs.id }&&pageIndex=${map.pageIndex }" title="置顶">置顶</a>
										        		</c:when>
										        		<c:otherwise>
										        			<a class="" href="setTop.do?&&type=unTop&&id=${blogs.id }&&pageIndex=${map.pageIndex }" title="取消置顶">取消置顶</a>
										        		</c:otherwise>
										        	</c:choose>
										        </td>
										         <td>
										        	<c:choose>
										        		<c:when test="${blogs.blogState==0 }">
										        			<a class="" href="setFreeze.do?&&type=freeze&&id=${blogs.id }&&pageIndex=${map.pageIndex }" title="冻结">冻结</a>
										        		</c:when>
										        		<c:otherwise>
										        			<a class="" href="setFreeze.do?&&type=unFreeze&&id=${blogs.id }&&pageIndex=${map.pageIndex }" title="发布">发布</a>
										        		</c:otherwise>
										        	</c:choose>
										        </td>
										  	    <td><a class="edit" href="javascript:;" onclick="editTag(${tag.id })">修改</a></td>
												<td><a class="delete" href="deleteBlog.do?id=${blogs.id }">删除</a></td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
								<jsp:include page="../include/page.jsp" />								
							</div>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
				</div>
				<!-- END PAGE CONTENT -->
			</div>
			<!-- END PAGE CONTAINER-->
		</div>
		<!-- END PAGE -->
	</div>

	<!-- END CONTAINER -->

	<!-- BEGIN FOOTER -->
	<jsp:include page="../include/admin_foot.jsp" />
	<!-- END FOOTER -->

	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

	<!-- BEGIN CORE PLUGINS -->
	<script src="../media/js/jquery-1.10.1.min.js" type="text/javascript"></script>
	<script src="../media/js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
	<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
	<script src="../media/js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>      
	<script src="../media/js/bootstrap.min.js" type="text/javascript"></script>
	<!-- END CORE PLUGINS -->

	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="../media/js/select2.min.js"></script>
	<script type="text/javascript" src="../media/js/jquery.dataTables.js"></script>
	
	<!-- END PAGE LEVEL PLUGINS -->

	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="../media/js/app.js"></script>
	<script src="../media/js/table-editable.js"></script>    

	<script>
		jQuery(document).ready(function() {       
		   App.init();
		   TableEditable.init();   
		   $("#sidebar > li[title='blogs']").addClass("start active");
		});	
	</script>

<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-37564768-1']);  _gaq.push(['_setDomainName', 'keenthemes.com']);  _gaq.push(['_setAllowLinker', true]);  _gaq.push(['_trackPageview']);  (function() {    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })();</script>
</body>
<!-- END BODY -->
</html>